nmea: Make 'had_checksum' global for the reader. Change reference data.
authoroliskoli <oliskoli>
Mon, 22 Sep 2008 20:54:52 +0000 (20:54 +0000)
committeroliskoli <oliskoli>
Mon, 22 Sep 2008 20:54:52 +0000 (20:54 +0000)
nmea.c
reference/track/amod-cleansed
reference/track/amod.gpx

diff --git a/nmea.c b/nmea.c
index 200ce5469f11f084591d0d7bca4d04b2b8ba4e65..60fc92a6d0ee98823d3386205419cbe6d044ce7f 100644 (file)
--- a/nmea.c
+++ b/nmea.c
@@ -183,6 +183,7 @@ static int amod_waypoint;
 static time_t last_time;
 static double last_read_time;   /* Last timestamp of GGA or PRMC */
 static int datum;
+static int had_checksum;
 
 static waypoint * nmea_rd_posn(posn_status *);
 static void nmea_rd_posn_init(const char *fname);
@@ -253,6 +254,7 @@ nmea_rd_init(const char *fname)
        last_waypt = NULL;
        last_time = -1;
        datum = DATUM_WGS84;
+       had_checksum = 0;
 
        CHECK_BOOL(opt_gprmc);
        CHECK_BOOL(opt_gpgga);
@@ -858,7 +860,6 @@ nmea_fix_timestamps(route_head *track)
 void
 nmea_parse_one_line(char *ibuf)
 {
-       int had_checksum = 0;
        char *ck;
        int ckval, ckcmp;
        char *tbuf = lrtrim(ibuf);
index 951b6097745df8bfc655fdbb9cfb369b357c47e8..c113e69b764594a18199b4430336b1b3f72fad77 100644 (file)
@@ -1,5 +1,3 @@
-$GPWPL,3549.499,N,08650.824,W,WPT001*31
-$GPWPL,3549.499,N,08650.824,W,WPT002*32
 $GPRMC,200641.000,V,3549.499,N,08650.824,W,0.00,224.45,050608,,*03
 $GPGGA,200641.000,3549.499,N,08650.824,W,0,00,0.0,0.000,M,0.0,M,,*74
 $GPVTG,224.450,T,0,M,0.000,N,0.000,K*55
index 50271e306483aaf9af699bdc9f47ebfa967b7ba5..f38d90d6e3051fb1429f18e61bdcbee1f44341bf 100644 (file)
@@ -7,24 +7,6 @@
   xsi:schemaLocation="http://www.topografix.com/GPX/1/0 http://www.topografix.com/GPX/1/0/gpx.xsd">
 <time>1970-01-01T00:00:00Z</time>
 <bounds minlat="35.824985000" minlon="-86.847065000" maxlat="35.824985000" maxlon="-86.847065000"/>
-<wpt lat="35.824985000" lon="-86.847065000">
-  <time>2008-06-05T20:06:41Z</time>
-  <name>WPT001</name>
-  <cmt>WPT001</cmt>
-  <desc>WPT001</desc>
-</wpt>
-<wpt lat="35.824985000" lon="-86.847065000">
-  <ele>269.900000</ele>
-  <time>2008-06-05T20:06:44Z</time>
-  <name>WPT002</name>
-  <cmt>WPT002</cmt>
-  <desc>WPT002</desc>
-  <fix>3d</fix>
-  <sat>6</sat>
-  <hdop>1.300000</hdop>
-  <vdop>1.800000</vdop>
-  <pdop>2.200000</pdop>
-</wpt>
 <trk>
 <trkseg>
 <trkpt lat="35.824985000" lon="-86.847065000">